package ioperation;
import book.BookList;
import static main.Main.writeBooksToFile;

public class ExitOperation implements IOperation {
    @Override
    public void work(BookList bookList) {

        System.out.println("退出系统....");
        // 程序结束后，将书籍信息写入文件
        writeBooksToFile(bookList, "books.txt");
        System.out.println("书籍信息已保存到 books.txt 文件中");
        System.exit(0);
    }
}
